#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
using namespace std;

class Solution {
public:
    int cuttingRope(int n) {
        int maxValue = INT16_MIN;
        for(int i = 2;i<=n;++i){
            int curr = n;
            int tempValue = 1;
            for(int j = i;j>=1;--j){
                tempValue *= curr/j;
                curr = curr-curr/j;
            }
            maxValue = max(maxValue,tempValue);
        }
        return maxValue;
    }
};

int main(){
    Solution S;
    cout<<S.cuttingRope(10)<<endl;
}